import request from '../utils/request'

enum API {
  GetArticle = '/posts'
}

interface Article {
  userId: number
  id: number
  title: string
  body: string
}

export const getArticleAPI = (data = {}) => {
  return request<Array<Article>>({
    method: 'get',
    url: API.GetArticle,
    data
  })
}
